:::tip Experimental
This documents unreleased main — not a released, committed API. See
the API stability policy and use Stable
instead.
:::
Robotiq::GripperStatusFlags Class
The GRIPPER STATUS byte (byte 0 of the status block).
This byte is decoded through named accessors: activated() and goToEnabled() answer single flag bits, while activationState() and objectDetection() unpack multi-bit fields into their own enums (ActivationState, ObjectDetection).
- Example
-
bool gripperStatusFlags(Robotiq::Gripper& gripper){Robotiq::GripperStatus status = gripper.getStatus();bool activated = status.gripperStatus.activated(); // gACT flagbool goTo = status.gripperStatus.goToEnabled(); // gGTO flagif(status.gripperStatus.activationState() == Robotiq::ActivationState::Complete&& status.gripperStatus.objectDetection() != Robotiq::ObjectDetection::Moving){// motion has settled}return activated && goTo;}
Included Headers
Members
| Public Operators | |
| bool | operator== (GripperStatusFlags other) const |
| bool | operator!= (GripperStatusFlags other) const |
| Public Member Functions | |
| bool | activated () const |
| bool | goToEnabled () const |
| ActivationState | activationState () const |
| ObjectDetection | objectDetection () const |
| uint8_t | raw () const |
| Public Static Functions | |
| static constexpr GripperStatusFlags | fromRaw (uint8_t bits) |
|
Synthesize a byte the gripper would have sent. More... | |
Public Operators
operator!=()
| inline |
- Returns
true if the flag bytes differ.
operator==()
| inline |
- Returns
true if both flag bytes are identical.
Public Member Functions
activated()
| inline |
- Returns
gACT — the echo of the last-sent rACT (activation request).
activationState()
| inline |
- Returns
gSTA — where the activation handshake stands; see ActivationState.
goToEnabled()
| inline |
- Returns
gGTO — the echo of the last-sent rGTO (go-to request).
objectDetection()
| inline |
- Returns
gOBJ — whether the fingers are moving or stopped on an object; see ObjectDetection.
raw()
| inline |
- Returns
The raw GRIPPER STATUS byte.
Public Static Functions
fromRaw()
| inline constexpr static |
Synthesize a byte the gripper would have sent.
For simulators and for exercising status handling without hardware.
- Parameters
-
bits The raw GRIPPER STATUS byte.
- Returns
A GripperStatusFlags wrapping bits.
The documentation for this class was generated from the following file:
- status.hpp
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.